import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        char[] ch = new char[26];

        for(int i = 0; i < str.length(); i++) {
            char cs = str.charAt(i);
            ch[cs - 'a']++;
        }

        boolean fly = true;
        for(int i = 0; i < str.length(); i++) {
            char cs = str.charAt(i);
            if(ch[cs - 'a'] == 1) {
                System.out.println(cs);
                fly = false;
                break;
            }
        }

        if(fly) {
            System.out.println(-1);
        }
    }
}
